//提取 路由数据--用他来 生成 动态菜单
let menuArr = [
  {
    name: "用户管理",
    meta: {
      title: "用户管理",
      icon: "Avatar",
      requireLogin: true
    },
    path: "/usermanager",

    children: [
      {
        path: "/usermanager/userlist",
        name: "用户列表",
        component: () => import("@/views/UserListPage.vue"),
        meta: {
          title: "用户列表",
          icon: "User",
          requireLogin: true
        }
      },
      {
        path: "/usermanager/useradd",
        name: "用户添加",
        component: () => import("@/views/UserAddPage.vue"),
        meta: {
          title: "用户添加",
          icon: "Plus",
          requireLogin: true
        }
      }
    ]
  },
  {
    name: "商品管理",
    meta: {
      title: "商品管理",
      icon: "Operation",
      requireLogin: true
    },
    path: "/product-manger",

    children: [
      //
      //   children 里面的 数据 看起来是三级路由，但是 上级路由没有执行component 属性。children本质是二级路由
      {
        path: "/product-manger/productlist",
        name: "商品列表",
        component: () => import("@/views/ProductListPage.vue"),
        meta: {
          title: "商品列表",
          requireLogin: true,
          icon: "Menu"
        }
      },
      {
        path: "/product-manger/productadd",
        name: "商品添加",
        component: () => import("@/views/ProductAddPage.vue"),
        meta: {
          title: "商品添加",
          requireLogin: true,
          icon: "CirclePlus"
        }
      }
    ]
  },
  {
    path: "/banner",
    name: "轮播图管理",
    meta: {
      title: "轮播图管理",
      requireLogin: true,
      icon: "Grid",

    },
    children: [
      {
        path: "/banner/bannerlist",
        name: "轮播图列表",
        component: () => import("@/views/BannerListPage.vue"),
        meta: {
          title: "轮播图列表",
          requireLogin: true,
          icon: "MoreFilled"
        },
      },
      {
        path: "/banner/banneradd",
        name: "轮播图添加",
        component: () => import("@/views/BannerAddPage.vue"),
        meta: {
          title: "轮播图添加",
          requireLogin: true,
          icon: "Plus"
        },
      }


    ]
  },
  {
    path: "/message",
    name: "信息管理",
    meta: {
      title: "信息管理",
      requireLogin: true,
      icon: "Edit",
    },
    children: [
      {
        path: "/messagelist",
        component: () => import("@/views/MessageList.vue"),
        name: "信息列表",
        meta: {
          title: "信息列表",
          requireLogin: true,
          icon: "Edit",

        }
      },
      {
        path: "/message/publish",
        name: "信息发布",
        component: () => import("@/views/MessagePublish.vue"),
        meta: {
          title: "信息发布",
          requireLogin: true,
          icon: "Edit",

        }
      }
    ]
  }
]

export default menuArr
